#include "BorderChecker.h"

BorderChecker::BorderChecker(double low, bool isLowClosure, double high, bool isHighClosure)
    : low_m(low), high_m(high), isLowClosure_m(isLowClosure), isHighClosure_m(isHighClosure)
{
    return;
}

bool BorderChecker::isValid(double value) const
{
    return (isLowClosure_m ? (value >= low_m) : (value > low_m))
                && (isHighClosure_m ? (value <= high_m) : (value < high_m));
}


